package com.hou.serviceImpl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hou.EX.ServicesException.VipLoginNotPhoneException;
import com.hou.EX.ServicesException.VipPasswordErrorException;
import com.hou.mapper.VipLoginMapper;
import com.hou.mapper.VipMapper;
import com.hou.pojo.Vip;
import com.hou.service.IVipService;
import com.hzk.utils.CookiesUtil;
import com.hzk.utils.UUIDUtil;
import com.hzk.vo.RespBean;
import com.hzk.vo.RespBeanEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author jack
 * @since 2022-04-07
 */
@Service
public class VipServiceImpl extends ServiceImpl<VipMapper, Vip> implements IVipService {
    @Autowired
    VipMapper vipMapper;
    @Autowired
    VipLoginMapper vipLoginMapper;

    @Override
    public List<Vip> select() {
        List<Vip> vips = vipMapper.selectList(null);

        return vips;
    }

  /*  @Override
    public RespBean login(Long phone, String password) {
        Long byPhone = vipLoginMapper.findByPhone(phone);
        if (byPhone == null) {
            *//*throw new VipLoginNotPhoneException("登录失败，手机号不存在");*//*
            return RespBean.error(RespBeanEnum.ADD_ERROR);
        }
        Vip vip = vipLoginMapper.VipLogin(phone, password);
        if (vip == null){
            return RespBean.error(RespBeanEnum.OPRATION_ERROR);

        }
        return RespBean.success();
    }*/


}
